<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>添加</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<%@include file="/resource/common/validate.jspf"%>
	<%@include file="/resource/common/wdate-picker.jspf"%>
<script type="text/javascript" src="${ctxStatic }/js/system/asyncDoSubmitForm.js"></script>

</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="content-box" >
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<fieldset>
							<input type="hidden" id="asyncResult" name="asyncResult" value="0" /> 
							<form:form id="inputForm" name="form1" class="form-horizontal" method="post" action="addWebExchangeRate.do" modelAttribute="WebExchangeRate">
								<div class="row">
									<div class="col-md-6 col-sm-6 col-xs-6" >
										<input type="hidden" id="id" name="id" value="${entity.id}" /> 
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">货币id:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.currencyId}" name="currencyId" id="currencyId"  placeholder="货币id"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">货币名称:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.currencyName}" name="currencyName" id="currencyName"  placeholder="货币名称"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">现汇买入价:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.buyingRate}" name="buyingRate" id="buyingRate"  placeholder="现汇买入价"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">现钞买入价:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.cashBuyingRate}" name="cashBuyingRate" id="cashBuyingRate"  placeholder="现钞买入价"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">现汇卖出价:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.exchBid}" name="exchBid" id="exchBid"  placeholder="现汇卖出价"/>
											</div>
										</div>
									</div>
									<div class="col-md-6 col-sm-6 col-xs-6" >
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">现钞卖出价:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.cashBid}" name="cashBid" id="cashBid"  placeholder="现钞卖出价"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">外管局中间价:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.safeIntermediate}" name="safeIntermediate" id="safeIntermediate"  placeholder="外管局中间价"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">中行折算价:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.boeConversionRate}" name="boeConversionRate" id="boeConversionRate"  placeholder="中行折算价"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">汇率:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.exchangeRate}" name="exchangeRate" id="exchangeRate"  placeholder="汇率"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">发布时间:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="<fmt:formatDate value="${entity.releaseTime}" pattern="yyyy-MM-dd HH:mm:ss" />" onfocus="dateUtils.showDate_YMDHMS(0,'releaseTime')" name="releaseTime" id="releaseTime"  placeholder="发布时间"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">是否启用:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<select name="status" id="status" class="form-control input-sm">
													<option value="true" <c:if test="${entity.status==true }">selected="selected"</c:if>>是</option>
													<option value="false" <c:if test="${entity.status==false }">selected="selected"</c:if>>否</option>
												</select>
											</div>
										</div>
									</div>
								</div>
							</form:form>
						</fieldset>
					</div>
				</div>
			</div>
		</div>
	</div>
<script type="text/javascript">
var result = 0;
var validateForm;
$(document).ready(function() {
	validateForm = $("#inputForm").validate({
		rules : {
			currencyId : {
				required : true
			},
			currencyName : {
				required : true
			},
			buyingRate : {
				required : true,
                number:true
			},
			cashBuyingRate : {
				required : true,
                number:true
			},
			exchBid : {
				required : true,
                number:true
			},
			cashBid : {
				required : true,
                number:true
			},
			safeIntermediate : {
				required : true,
                number:true
			},
			boeConversionRate : {
				required : true,
                number:true
			},
			exchangeRate : {
                number:true
			},
			releaseTime : {
				required : true,
				date:true
			},
			status : {
				required : true
			}
		},
		messages : {
			currencyId : {
				required : "货币id不能为空"
			},
			currencyName : {
				required : "货币名称不能为空"
			},
			buyingRate : {
				required : "现汇买入价不能为空",
                number: "请输入有效的数字"
			},
			cashBuyingRate : {
				required : "现钞买入价不能为空",
                number: "请输入有效的数字"
			},
			exchBid : {
				required : "现汇卖出价不能为空",
                number: "请输入有效的数字"
			},
			cashBid : {
				required : "现钞卖出价不能为空",
                number: "请输入有效的数字"
			},
			safeIntermediate : {
				required : "外管局中间价不能为空",
                number: "请输入有效的数字"
			},
			boeConversionRate : {
				required : "中行折算价不能为空",
                number: "请输入有效的数字"
			},
			exchangeRate : {
                number: "请输入有效的数字"
			},
			releaseTime : {
				required : "发布时间不能为空",
			},
			status : {
				required : "status不能为空"
			}
		},
		errorElement : "em",
		errorClass : "validate_error",
		submitHandler: function(form) { //通过之后回调
		},
		invalidHandler: function(form, validator) {
			return false;
		}
	});
});

</script>	
</body>
<!-- Download From www.exet.tk-->
</html>